# -*- coding: utf-8 -*-


from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
import time

# 加载驱动
driver = webdriver.Chrome()
# 最大化
driver.maximize_window()
# 加载网站
driver.get('https://www.vip.com/')

time.sleep(2)
# 定位元素
el = driver.find_element(By.XPATH, '//ul[@id="J-topNavTool"]/li[6]')
print(el)

# 点击
el.click()
# driver.execute_script('arguments[0].click();', el)  # js代码的点击方法
time.sleep(2)
el.find_element(By.XPATH,'./div/p/span[2]').click()



